package com.lzs.system.mapper;

import com.lzs.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 管理员表 Mapper 接口
 * </p>
 *
 * @author 刘中帅
 * @since 2020-11-24
 */
@Repository
public interface UserMapper extends BaseMapper<User> {
//    Page<User> selectAllUserPage(IPage<User> page, @Param("map") Map map);
    int updateStatus(@Param("userId") Long userId,@Param("status") String status);
    List<Long> selectRoleByUserId(Long userId);
    int insertRoleByUserId(@Param("roles") List<Long> roles,@Param("userId") Long userId);
    int deleteRoleByUserId(Long userId);
    List<Long> selectWarehouseByUserId(Long userId);
    User  findByUserId(Long userId);
}
